<template>
  <section class="child mg-t12" v-show="show">
    <el-button type="success" @click="$emit('update:show', false)">我是child1</el-button>
    <el-button type="primary" @click="$emit('event-handler', Math.random())">生成随机数</el-button>

    <!-- slot -->
    <slot v-bind:user="user">
      {{ user.lastName }}
    </slot>
  </section>
</template>
<script>
export default {
  name: 'ChildOne',
  props: {
    show: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      user: {
        firstName: '陈-姓',
        lastName: '小飞'
      },
      entrances: [{
        title: '交易单管理',
        url: 'https://sales.tiqianle.com/res/entry/trade.html',
        open: true,
        white: [
          39345,
          13661,
          13691,
          13726,
          21934,
          23881,
          13725,
          13689,
          49553,
          13726,
          13718,
          23694,
          13690,
          24280,
          13725,
          13719,
          13688,
          55918,
          15105,27809,18915,18980,18873,40572,40582,21934,39345,36655,36654,28464,18923
       ]
      }, {
        title: '授信单管理',
        url: 'https://sales.tiqianle.com/res/entry/order/list.html',
        open: true,
        white: [
          39345,
          13661,
          13691,
          13726,
          21934,
          23881,
          13725,
          13689,
          49553,
          13726,
          13718,
          23694,
          13690,
          24280,
          13725,
          13719,
          13688,
          55918,
          15105,27809,18915,18980,18873,40572,40582,21934,39345,36655,36654,28464,18923,38672
        ]
      }]
    }
  }
}
</script>
<style lang="less" scoped>

</style>
